package cn.thoughtworks.school.programCenter.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;
import java.util.Map;


@FeignClient(name="${feign.visualizationCenter.name}",
        url = "${feign.visualizationCenter.url}")
@Service
public interface VisualizationCenterFeign {

    @GetMapping("/api/queries/types/{type}/programs/{programId}/tutors/{tutorId}")
    ResponseEntity<List<Map<String, String>>> findAssignmentsStudentsStatus(@PathVariable("type") String type,
                                                                            @PathVariable("programId") Long programId,
                                                                            @PathVariable("tutorId") Long tutorId);

    @GetMapping("/api/queries/types/{type}/programs/{programId}/assignments/{assignmentId}/tutors/{tutorId}")
    ResponseEntity<List<Map<String, String>>> findAssignmentsStatusByAssignment(@PathVariable("type") String type,
                                                                            @PathVariable("programId") Long programId,
                                                                            @PathVariable("assignmentId") Long assignmentId,
                                                                            @PathVariable("tutorId") Long tutorId);

}
